import { Bus } from "@/utils";

export const form = {
  props: {
    tasksConfig: {
      type: Object,
      default() {
        return {};
      },
    },
    layer: {
      type: Object,
      default() {
        return {};
      },
    },
    nodeId: {
      type: String,
      default() {
        return "Home";
      },
    },
  },
  computed: {},
  watch: {},
  methods: {
    i18n(v) {
      return this.$t("lang." + v);
    },
    reloadInitData(v) {
      Bus.$emit("reloadInitData", v);
    },
    submitHandle(v) {
      Bus.$emit("submitHandle", v);
    },
    saveHandle(v) {
      Bus.$emit("saveHandle", v);
    },
    cancelHandle(v) {
      Bus.$emit("cancelHandle", v);
    },
    goBackHandle(v) {
      Bus.$emit("goBackHandle", v);
    },
    deleteHandle(v) {
      Bus.$emit("deleteHandle", v);
    },
    searchHandle(v) {
      Bus.$emit("searchHandle", v);
    },
  },
};
